package com.lxj.controller.bus;

import com.lxj.common.Result;
import com.lxj.domain.BusRent;
import com.lxj.dto.BusRentDto;
import com.lxj.service.RentService;
import com.lxj.vo.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author lxj
 * @date 2021/6/21 9:44
 * @Description:
 */
@RestController
@RequestMapping("/busrent")
public class BusRentController {

    @Autowired
    private RentService rentService;

    /**
     * 查询所有
     * @return
     */
    @GetMapping("/findByPage.do")
    public Result findByPage(BusRentDto dto){
        PageInfo<BusRent> pageInfo = rentService.findByPage(dto);
        return new Result(pageInfo);
    }
}
